package com.grj.parkingsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 停车订单表
 * @TableName t_parking_order
 */
@TableName(value ="t_parking_order")
@Data
public class ParkingOrder implements Serializable {
    /**
     * 订单ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单号
     */
    @TableField(value = "order_number")
    private String orderNumber;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 车辆ID
     */
    @TableField(value = "vehicle_id")
    private Long vehicleId;

    /**
     * 停车场ID
     */
    @TableField(value = "parking_lot_id")
    private Long parkingLotId;

    /**
     * 车位ID
     */
    @TableField(value = "space_id")
    private Long spaceId;

    /**
     * 入场时间
     */
    @TableField(value = "entry_time")
    private Date entryTime;

    /**
     * 出场时间
     */
    @TableField(value = "exit_time")
    private Date exitTime;

    /**
     * 停车时长(分钟)
     */
    @TableField(value = "duration")
    private Integer duration;

    /**
     * 原价
     */
    @TableField(value = "original_price")
    private BigDecimal originalPrice;

    /**
     * 优惠金额
     */
    @TableField(value = "discount_amount")
    private BigDecimal discountAmount;

    /**
     * 实付金额
     */
    @TableField(value = "actual_price")
    private BigDecimal actualPrice;

    /**
     * 支付方式(0:未支付,1:微信,2:支付宝,3:现金)
     */
    @TableField(value = "payment_method")
    private Integer paymentMethod;

    /**
     * 支付时间
     */
    @TableField(value = "payment_time")
    private Date paymentTime;

    /**
     * 订单状态(0:进行中,1:已完成,2:已取消)
     */
    @TableField(value = "order_status")
    private Integer orderStatus;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}